<?php
/*
 * This file is part of the Dektrium project.
 *
 * (c) Dektrium project <http://github.com/dektrium>
 *
 * For the full copyright and license information, please view the LICENSE.md
 * file that was distributed with this source code.
 */

use yii\widgets\Menu;

/** @var dektrium\user\models\User $user */
$user            = Yii::$app->user->identity;
$networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
?>
<style>
    .list-group .list-group-item.active a {color:#fff;}
</style>

<?=
Menu::widget([
    'options'     => ['class' => 'list-group'],
    'itemOptions' => ['class' => 'list-group-item'],
    'items'       => [
        ['label' => '金币余额', 'url' => ['/credit/my/index']],
        ['label' => '个人信息', 'url' => ['/user/settings/profile']],
        ['label' => '修改密码', 'url' => ['/user/settings/account']],
        ['label' => '授权登录', 'url' => ['/user/settings/networks'], 'visible' => $networksVisible],
    ],
])
?>
